﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace CS322_V7
{
    static class Program
    {
        enum Temperatures
        {
            WickedCold = 0,
            FreezingPoint = 32,
            LightJacketWeather = 60,
            SwimmingWeather = 72,
            BoilingPoint = 212,
        }

        enum autoBoja
        {
            Crvena, Siva, Crna, Teget,
        }
        struct Auto
        {
            public autoBoja boja;
            public decimal cena;
        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            int[] intArray;

            Student[] stArray;

            intArray = new int[5];

            stArray = new Student[3];

            // popunjavanje niza
            for (int i = 0; i < stArray.Length; i++)
            {
                stArray[i] = new Student(i + 5);
            }

            for (int i = 0; i < intArray.Length; i++)
            {
                Console.WriteLine(intArray[i].ToString());
            }

            for (int i = 0; i < stArray.Length; i++)
            {
                Console.WriteLine(stArray[i].ToString());
            }


            CS322_V7.StructExample.Location loc1 = new CS322_V7.StructExample.Location(200, 300);
            Console.WriteLine("Loc1 location: {0}", loc1);

            myFunc(loc1);
            Console.WriteLine("Loc1 location: {0}", loc1);

            Auto auto1 = new Auto();
            auto1.boja = autoBoja.Siva;
            Console.WriteLine("Boja automobila: " + auto1.boja.ToString());
            
            string parameter1 = "oooooooo";
            string parameter2 = "oooooooo";
            string parameter3; //bez inicijalizacije 

            FunkcijaHelloworld(parameter1, ref parameter2, out parameter3);

            MessageBox.Show(parameter1);
            MessageBox.Show(parameter2);
            MessageBox.Show(parameter3);

           //   Application.Run(new FormNetworkInterfaces());
            Application.Run(new DirTree());

        }


        private static void FunkcijaHelloworld(string parameter1, ref string parameter2, out string parameter3)
        {
            parameter1 = "helloworld";
            parameter2 = "helloworld";
            parameter3 = "helloworld";
        }

        public static void myFunc(CS322_V7.StructExample.Location loc)
        {
            loc.x = 50;
            loc.y = 100;
            Console.WriteLine("In MyFunc loc: {0}", loc);
        }

    }
}
